{config_load file=test.conf section="setup"}
{include file="header.tpl" title=Questions Name=Modify}

<script type="text/javascript" src="../jscripts/modify.js"></script>

<h1>Modify Question</h1>
<PRE>
<form name="modify_form" action="delete_question.php" method="post" onsubmit="return confirmAction()">
<table border="1" align="center">
	<tr>
		<td>&nbsp;</td>
		<td colspan="2"><input type="text" name="search" id="search" /><input type="button" name="search_q" value="Search" onclick="search_question()"/></td>
		<td><select name="s_category" onchange="select_category(this.options[this.selectedIndex].value)">
				{section name = c loop = $categories}
					{$categories[c]}	
				{/section}
			</select>
		</td>
		<td><select name="faculty" onchange="select_faculty(this.options[this.selectedIndex].value)")>
				{section name = f loop = $faculties}
					{$faculties[f]}
				{/section}
			</select>
		</td>
		<td align="center">
			<select name="compexity" onchange="select_complexity(this.options[this.selectedIndex].text)">
				<option>Any</option>
				<option {if $comp eq 1} selected="selected"{/if}>1</option>
				<option {if $comp eq 2} selected="selected"{/if}>2</option>
				<option {if $comp eq 3} selected="selected"{/if}>3</option>
				<option {if $comp eq 4} selected="selected"{/if}>4</option>
				<option {if $comp eq 5} selected="selected"{/if}>5</option>
			</select>
		</td>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td><a href="modify_question.php">No</a></td>
		<td><input type="checkbox" name="all_check" id="all_check" onclick="checkAll()"/></td>
		<td><a href="modify_question.php?sortby=q.q_title">Question</a></td>
		<td><a href="modify_question.php?sortby=c.cat_title">Category</a></td>
		<td><a href="modify_question.php?sortby=c.faculty_ids">Faculty</a></td>
		<td><a href="modify_question.php?sortby=q.q_complexity">Complexity</a></td>
		<td><a href="modify_question.php?sortby=q.q_cdate">Created date</a></td>
		<td><a href="modify_question.php?sortby=q.q_udate">Updated date</a></td>
	</tr>
	{section name = i loop = $q_title}
		<tr>
			<td>{$smarty.section.i.rownum}</td>
			<td id="{$smarty.section.i.rownum}"><input type="checkbox" name="check_q[]" value="{$q_id[i]}" /></td>
			<td><a href="modifing_question.php?id={$q_id[i]}">{$q_title[i]}</a></td>
			<td>{$cat_title[i]}</td>
			<td>{$f_title[i]}</td>
			<td align="center">{$q_complexity[i]}</td>
			<td>{$q_cdate[i]}</td>
			<td>{$q_udate[i]}</td>
		</tr>
	{/section}
	<tr align="center">
		<td colspan="8">
			<input type="button" name="previous" value="Previous" onclick="step_limit(-{$limit})"/>
			<select name="limit" onchange="submit_limit(this.options[this.selectedIndex].value)">
				<option {if $limit eq 5} selected="selected"{/if}>5</option>
				<option {if $limit eq 10} selected="selected"{/if}>10</option>
				<option {if $limit eq 20} selected="selected"{/if}>20</option>
				<option {if $limit eq 50} selected="selected"{/if}>50</option>
				<option {if $limit eq 100} selected="selected"{/if}>100</option>
			</select>
			<input type="button" name="next" value="Next" onclick="step_limit({$limit})"/>
		</td>
	</tr>
	<tr align="center">
		<td colspan="8">
			{section name = j loop = $pages}
				<a href="modify_question.php?page={$smarty.section.j.rownum}">{$smarty.section.j.rownum}</a>
			{/section}
		</td>
	</tr>
	<tr>
		<td colspan="8">
			<input type="submit" name="delete" value="Delete"/>
		</td>
	</tr>
</table>
</form>
</PRE>
<a href="../questions.php">back to Question</a>

{include file="footer.tpl"}